// pages/user/index.js
Page({

  data: {
    userInfo:{},
    likeNums:0,
    collectNums:0 //被收藏的电影数量
  },

  onShow(){
    const userInfo = wx.getStorageSync('userInfo');
    const like = wx.getStorageSync("like") || [] ;
    const collect = wx.getStorageSync("collect") || [] ;

    this.setData({
      userInfo,
      likeNums:like.length,
      collectNums:collect.length
    })
  }
})